package com.matt.repository;

import com.matt.domain.Children;
import com.matt.domain.TeachingArea;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * *******************************
 * Created by Ron.
 * form com.matt
 * on 2017/9/4
 * *******************************
 */
public interface TeachingAreaRepository extends JpaRepository<TeachingArea, String> , JpaSpecificationExecutor<TeachingArea> {
    List<TeachingArea> findByAreaIdAndDeleted(String areaId, Boolean deleted);

    Long countByAreaIdAndDeleted(String areaId, Boolean deleted);

    TeachingArea findByNameAndAreaId(String name, String areaId);

    TeachingArea findByAreaIdAndId(String areaId, String id);

//    TeachingArea getOneById(String id);
}
